﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sio.Mdm.Entities;
using Sio.Mdm.Types;
using Sio.Mdm.Server;
using System.Linq.Expressions;

namespace Sio.Mdm.BL.Base
{
    public interface IBaseService<T> : IService where T : Sio.Mdm.Entities.IEntity
    {
        Result Create(T entity, Session session);
        Result Delete(T entity, Session session);
        Result Update(T entity, Session session);
        Result Update(ref EntityCollection<T> collection, Session session);
        //Sio.Mdm.Entities.Filter<T> Filter();
        Result Select(ref EntityCollection<T> result, ISioFilter<T> filter, Session session);
        Result Count(ref int entity, ISioFilter<T> filter, Session session);
        Result SelectDeleted(ref EntityCollection<T> result, ISioFilter<T> filter, Session session);
        Result CountDeleted(ref int entity, ISioFilter<T> filter, Session session);
    }
}
